<template>
	<div>
		<h1>A组件</h1>
		<button @click='btn'>按钮</button>
	</div>
</template>

<script setup>
import emitter from '../plugins/Bus.js'

let str = ref('这是A组件的数据');

const btn = ()=>{
	emitter.emit('fn',str);
}

</script>